# 被装饰的函数有参数
def outer(fn):
    def inner(name):  # 内函数,name是内函数的参数
        print(name,"是inner函数中的参数")
        fn(name)
    return inner

@outer   # 相当于将下面的函数作为fn参数传递进去
def func(name):
    print("这是被装饰的函数")
func("lee")


def docr1(fn):
    def inner():
        return "docr1"+fn()+"d1完"
    return inner

def docr2(fn):
    def inner():
        return "docr2"+fn()+"d2完"
    return inner

@docr2
@docr1
def func():
    return "func函数"

print(func())








